package com.caojing.syby.ui.home;

import com.caojing.syby.bean.home.HomeGvBean;
import com.caojing.syby.bean.home.HomeTodayBean;
import com.caojing.syby.bean.home.HomeVpBean;
import com.caojing.syby.httputils.HttpUtils;

import java.util.HashMap;
import java.util.List;

/**
 * Created by CaoJing on 2016/10/5.
 */
public class HomeModel implements HomeContract.Model {
    /*加载vp数据的方法*/
    @Override
    public void getVpBean(HttpUtils.HttpCallBack<HomeVpBean> homeVpBeanHttpCallBack) {
        /*调用httputils中对应方法加载数据*/
        HttpUtils.getInstance().getHomeVpBean(homeVpBeanHttpCallBack);
    }
    /*加载中间视图数据的方法*/
    @Override
    public void getTodayBean(HttpUtils.HttpCallBack<List<HomeTodayBean>> listHttpCallBack) {
        /*调用httputils中对应方法加载数据*/
        HttpUtils.getInstance().getHomeTodayBean(listHttpCallBack);
    }
    /*加载gridview的数据方法*/
    @Override
    public void getGvBean(HashMap<String, String> params, HttpUtils.HttpCallBack<HomeGvBean> homeGvBeanHttpCallBack) {
        /*调用httputils中对应方法加载数据*/
        HttpUtils.getInstance().getHomeGvBean(params,homeGvBeanHttpCallBack);
    }
}
